package com.yuexunit.operationman.nbsy.module.SurgicalReceipt;

import android.content.Context;
import android.content.res.Resources;

import com.yuexunit.operationman.nbsy.R;
import com.yuexunit.operationman.nbsy.module.SurgicalReceipt.Bean.SurgicalReceiptBean;

import java.util.ArrayList;

/**
 * Created by work-jx on 2017/8/2.
 */
public class SurgicalReceiptContracts {
    public static final ArrayList<SurgicalReceiptBean.ObjectEntity.HandoverItemListEntity> handoverItemListEntities(Context context)
    {
        Resources res =context.getResources();
        String[] languages = res.getStringArray(R.array.surgicalreceipt);
        ArrayList<SurgicalReceiptBean.ObjectEntity.HandoverItemListEntity> handoverItemListEntities = new ArrayList<>();
        for(int i = 0; i<languages.length;i++)
        {
            SurgicalReceiptBean.ObjectEntity.HandoverItemListEntity handoverItemListEntity = new SurgicalReceiptBean.ObjectEntity.HandoverItemListEntity();
            handoverItemListEntity.setItemCode(languages[i]);
            handoverItemListEntity.setItemValue("");
            handoverItemListEntity.setItemOther("");
            handoverItemListEntity.setHandoverId("");
            handoverItemListEntity.setHandoverItemId("");
            handoverItemListEntities.add(handoverItemListEntity);
        }
        return handoverItemListEntities;
    };

    public static final ArrayList<SurgicalReceiptBean.ObjectEntity.HandoverItemListEntity> handoverItemListEntities_New(Context context)
    {
        Resources res =context.getResources();
        String[] languages = res.getStringArray(R.array.surgicalreceipt);
        ArrayList<SurgicalReceiptBean.ObjectEntity.HandoverItemListEntity> handoverItemListEntities = new ArrayList<>();
        for(int i = 0; i<languages.length;i++)
        {
            SurgicalReceiptBean.ObjectEntity.HandoverItemListEntity handoverItemListEntity = new SurgicalReceiptBean.ObjectEntity.HandoverItemListEntity();
            handoverItemListEntity.setItemCode(languages[i]);
            handoverItemListEntity.setItemOther("");
            handoverItemListEntity.setHandoverId("");
            handoverItemListEntity.setHandoverItemId("");
            switch (languages[i]) {
                case "BS_First":
                    handoverItemListEntity.setItemValue(";;;;;;;");
                    break;
                case "BS_ShiWuQueRen":
                    handoverItemListEntity.setItemValue(";;");
                    break;
                case "BS_DaiRuWuPin":
                    handoverItemListEntity.setItemValue(";;;;;");
                    break;
                case "BS_ShenFenQueRen":
                    handoverItemListEntity.setItemValue("");
                    break;
                case "BS_YiShi":
                    handoverItemListEntity.setItemValue(";;;;");
                    break;
                case "BS_T":
                    handoverItemListEntity.setItemValue("");
                    break;
                case "BS_P":
                    handoverItemListEntity.setItemValue("");
                    break;
                case "BS_R":
                    handoverItemListEntity.setItemValue("");
                    break;
                case "BS_BP":
                    handoverItemListEntity.setItemValue("");
                    break;
                case "BS_YaChuang":
                    handoverItemListEntity.setItemValue(";;;");
                    break;
                case "BS_XueZhiPin":
                    handoverItemListEntity.setItemValue(";");
                    break;
                case "BS_Guandao":
                    handoverItemListEntity.setItemValue(";;;;;;;;;;;;");
                    break;
                case "BS_XiYangFangShi":
                    handoverItemListEntity.setItemValue(";;;;;;");
                    break;
                case "BS_Other":
                    handoverItemListEntity.setItemValue("");
                    break;
                case "SF_ShenFenQueRen":
                    handoverItemListEntity.setItemValue("");
                    break;
                case "SF_YiShi":
                    handoverItemListEntity.setItemValue(";;;;;");
                    break;
                case "SF_ShenMingTiZheng":
                    handoverItemListEntity.setItemValue(";;");
                    break;
                case "SF_YaChuang":
                    handoverItemListEntity.setItemValue(";;;");
                    break;
                case "SF_XueZhiPin":
                    handoverItemListEntity.setItemValue(";");
                    break;
                case "SF_Guandao":
                    handoverItemListEntity.setItemValue(";;;;;;;;;;;;");
                    break;
                case "SF_ZhiTongBeng":
                    handoverItemListEntity.setItemValue(";");
                    break;
                case "SF_ZiLiao":
                    handoverItemListEntity.setItemValue("");
                    break;
                case "SF_XiYangFangShi":
                    handoverItemListEntity.setItemValue(";;;;;;");
                    break;
                case "SF_Other":
                    handoverItemListEntity.setItemValue("");
                    break;
                case "SF_JingMaiTongLu":
                    handoverItemListEntity.setItemValue(";;;;;");
                    break;
                case "FB_ShenFenQueRen":
                    handoverItemListEntity.setItemValue("");
                    break;
                case "FB_YiShi":
                    handoverItemListEntity.setItemValue(";;;;");
                    break;
                case "FB_ShenMingTiZheng":
                    handoverItemListEntity.setItemValue("");
                    break;
                case "FB_YaChuang":
                    handoverItemListEntity.setItemValue(";;;");
                    break;
                case "FB_XueZhiPin":
                    handoverItemListEntity.setItemValue(";");
                    break;
                case "FB_Guandao":
                    handoverItemListEntity.setItemValue(";;;;;;;;;;;;");
                    break;
                case "FB_ZhiTongBeng":
                    handoverItemListEntity.setItemValue(";");
                    break;
                case "FB_ZiLiao":
                    handoverItemListEntity.setItemValue("");
                    break;
                case "FB_XiYangFangShi":
                    handoverItemListEntity.setItemValue(";;;;;;");
                    break;
                case "FB_Other":
                    handoverItemListEntity.setItemValue("");
                    break;
                default:
                    handoverItemListEntity.setItemValue("");
                    break;
            }
            handoverItemListEntities.add(handoverItemListEntity);
        }
        return handoverItemListEntities;
    };
}
